package com.ktjy.service.impl;

import com.ktjy.mapper.SongListMapper;
import com.ktjy.pojo.SongList;
import com.ktjy.service.ISongListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class SongListServiceImpl implements ISongListService {

    @Autowired
    SongListMapper songListMapper;

    @Override
    public List<SongList> getPageList(String startTime, String endTime, Integer pageNo, Integer pgeSize) {
        return songListMapper.getPageList(startTime, endTime, (pageNo - 1) * pgeSize, pgeSize);
    }

    @Override
    public int getCount(String startTime, String endTime) {
        return songListMapper.getCount(startTime, endTime);
    }

    @Override
    public int insertSongList(SongList songList) {
        return songListMapper.insertSongList(songList);
    }

    @Override
    public int delSongList(Long id) {
        return songListMapper.delSongList(id);
    }

    @Override
    public SongList getById(Long id) {
        return songListMapper.getById(id);
    }

    @Override
    public int updateSongList(SongList songList) {
        return songListMapper.updateSongList(songList);
    }
}
